<?php
if( empty( $_SESSION ) )
{
	session_start();	
}
include_once("../includes/cls.main.php");include_once("../includes/cls.idioma.php");
$oPagina = new main();
$oIdioma = new idioma();
if( empty( $_SESSION["idioma"] ) )
{
	$oIdioma->getIdioma( 'BR' );
}
else
{
	$oIdioma->getIdioma( $_SESSION["idioma"] );
}
if( empty ( $_GET["id"] ) ){	header("location:../");}else{	$id_sumario = $oPagina->sqlfilter( $_GET["id"] );	$aDados = $oPagina->pagina( $id_sumario );
	if( ! empty ( $aDados ) )	{		foreach( $aDados as $sItens )		{			$titulo         = $sItens["titulo"];			$subtitulo      = $sItens["subtitulo"];			$detalhes       = $sItens["detalhes"];			$id_colaborador = $sItens["id_colaborador"];			$colaborador    = $sItens["nome_colaborador"];			$indicar        = $sItens["indicar"];		}	}}?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title><?php echo $titulo; ?></title><meta name="author" content="Luiz Paulo Araujo Pedrosa e Daniel Machado Maffioletti" /><meta http-equiv="Content-Language" content="pt-br"/><meta name="description" content="Revista da Capoterapia - Mestre Gilvan - Brasília-DF" /><!--<link rel="SHORTCUT ICON" href="http://www.feblivraria.com.br/favicon.ico" />--><link href="../css/css.css" rel="stylesheet" type="text/css" /><link type="text/css" media="screen" rel="stylesheet" href="../includes/colorbox.css" /><!--[if IE]><link type="text/css" media="screen" rel="stylesheet" href="../includes/colorbox-ie.css" title="example" /><![endif]--><script src="../includes/jquery-1.3.2.min.js"></script><script src="../includes/jquery.colorbox.js" type="text/javascript"></script><script src="../includes/main.js" type="text/javascript"></script><script>$(document).ready(function(){	$("a[href='indicar.php?id=<?php echo $_GET["id"];?>']")	.colorbox({				  width:"50%",				  height:"400",				  iframe:true			  });
	$("a[href='imprimir.php?id=<?php echo $_GET["id"];?>']")	.colorbox({				  width:"770",				  height:"90%",				  iframe:true			  });});
function setFocus(){	var busca = "<?php echo $_SESSION["edicao_pesquisa"]; ?>";	document.getElementById("busca_rapida").value = busca;	document.getElementById("busca_rapida").select();}</script></head><body id="capa"><div id="wrapper">  <!-- header -->  <div id="header">    <!-- logo da revista -->    <h1><a href="../wpo/" title="WPO - Voltar para a página inicial">Revista Caporerapia</a></h1>    <h2>Mestre Gilvan</h2>    <!-- pesquisa rapida -->    <fieldset>      <legend>Formulário de Pesquisa Rápida</legend>      <form action="pesquisa.php" method="post" id="frm_busca_rapida">        <label for="busca_rapida">          <input type="text" name="busca_rapida" id="busca_rapida" value="<?php echo $_SESSION["edicao_pesquisa"]; ?>" onfocus="javascript:setFocus();" />        </label>        <input type="submit" id="bt" value="OK" />      </form>    </fieldset>    <!-- edicao -->        <p>        <?php echo $_SESSION["mes_atual"];?> <?php echo $oPagina->data_ano( $_SESSION["data_ano"] ); ?>        </p>    <!-- FIM do header -->  </div>  <!-- div container engloba o conteudo principal (coluna 1) e a coluna auxiliar(coluna 2) -->  <div id="container">    <!-- menu horizontal "navegacao superior" -->    <div id="hornav">      <!-- navegacao superior -->      <ul id="nav1">        <li id="inicial"><a href="../online/"><?php echo $_SESSION["link_inicial"]; ?></a></li>        <li id="colaboradores"><a href="fale-conosco.php"><?php echo $_SESSION["link_colaboradores"]; ?></a></li>        <li id="expediente"><a href="expediente.php"><?php echo $_SESSION["link_expediente"]; ?></a></li>      </ul>        <ul id="language">            <?php			$aDados = $oPagina->select_idioma();			foreach( $aDados as $sItens )			{				echo "<li id='". $sItens["sigla"] ."' title='" . $sItens["sigla"] . "'>";				echo "<a href='../online/?lan=" . $sItens["sigla"] . "' title='" . $sItens["sigla"] . "'>";				echo "<img src='../admin/imagens/" . strtolower($sItens["sigla"]) . ".gif' alt='" . $sItens["sigla"] . "' /></a>";				echo "</li>";			}			?>            <!-- <li><a href="#">Esperanto</a></li> -->          	</ul>		<!--FIM navegacao superior -->		<!-- FIM menu horizontal "navegacao superior" -->      <hr />    </div>    <!-- conteudo principal -->    <div id="content">      <div id="main_content">        <!-- div do conteudo paginas internas -->        <div id="conteudo">          <!--<p class="area">Presença de Chico Xavier</p>-->          <h1><?php echo $titulo; ?></h1>          <h2><?php echo $subtitulo; ?></h2>          <p><?php echo $colaborador; ?></p>		  <?php echo $detalhes; 
			if( ! empty( $indicar ) )			{				if( $indicar == 1 )				{					echo '<p id="indicar">';					echo '<a style="text-decoration:none;color:#00F" href="indicar.php?id=' . $_GET["id"] . '">Indicar para um amigo</a>';					echo '</p>';				}			}		  ?>
          	<p id="imprimir">			<a style="text-decoration:none;color:#00F" href="imprimir.php?id=<?php echo $_GET["id"];?>">Imprimir esta página</a>			</p>                    <!-- FIM materia -->        </div>        <!-- FIM conteudo principal -->        <hr />      </div>    </div>    <!-- inicio da segunda coluna -->    <div id="aux_col">            <div id="edicao_do_mes">                <h3>					<?php echo $_SESSION["edicao_menu_imagem"]; ?>                </h3>                <p>                	<img src="../<?php echo $_SESSION["imagem"]; ?>" alt="Capa da Revista do Mês" />                </p>      		</div>
        	<div id="sumario">                <h3>					<?php echo $_SESSION["edicao_menu_superior"]; ?>                </h3>
                <dl id="grupo1">					<?php					$aDados = $oPagina->sumario();					foreach( $aDados as $sItens )					{						echo "<dt><a href=?id=" . $sItens["id_pagina_indice"] . ">" . $sItens["titulo"] . "</a></dt>";						echo "<dd>" . $sItens["subtitulo"] . "</dd>";					}					?>                </dl>                <h4><?php echo $_SESSION["edicao_menu_inferior"]; ?></h4>                <dl>					<?php					$aDados = $oPagina->sumario( 1 );					foreach( $aDados as $sItens )					{						echo "<dt><a href=?id=" . $sItens["id"] . ">" . $sItens["titulo"] . "</a></dt>";						echo "<dd>" . $sItens["subtitulo"] . "</dd>";					}					?>                </dl>			<!-- fim sumario -->            </div>
      <hr />      <!-- FIM da segunda coluna -->    </div>    <!-- FIM div container engloba o conteudo principal (coluna 1) e a coluna auxiliar(coluna 2) -->    <hr />  </div>  <!-- FIM da div wrapper --></div><!-- div wrapper do rodape --><div id="rodape_wrapper">  <div id="rodape">  <!-- menu horizontal "navegacao rodape" -->  <!-- menu horizontal "navegacao rodape" -->    <ul>      <li><a href="../online/"><?php echo $_SESSION["link_inicial"]; ?></a></li>      <li class="last"><a href="fale-conosco.php"><?php echo $_SESSION["link_colaboradores"]; ?></a></li>    </ul>    <!-- FIM menu horizontal "navegacao rodape" -->    <!-- FIM menu horizontal "navegacao rodape" -->    <div id="feb">      <p><?php echo $_SESSION["edicao_rodape"]; ?></p>    </div>
    <!-- FIM div do rodape -->  </div>  <!-- FIM div wrapper do rodape -->  <hr /></div></body></html>